package com.zdp.degisn.strategy_model.strategy.convert;

import com.zdp.degisn.strategy_model.entity.PdfFile;
import com.zdp.degisn.strategy_model.entity.WordFile;

/**
 * @author zhengdp
 * @Description Word 文件转换成 PDF文件 文件的转换操作可以用 Aspose来完成（这边就做个模拟，以后完善）
 * @Date 2022/9/14 22:14
 * @Created by zhengdp
 */
public class WordConvertPdf implements ConvertStrategy<WordFile, PdfFile> {

    private WordConvertPdf(){}

    private static class WordConvertPdfInstance {
        private static final WordConvertPdf instance = new WordConvertPdf();
    }

    public static WordConvertPdf getInstance() {
        return WordConvertPdf.WordConvertPdfInstance.instance;
    }

    @Override
    public PdfFile convert(WordFile obj) {
        System.out.println("将Word文件转换为 PDF文件");
        return new PdfFile();
    }
}
